import './App.css';
import { Router, Route, Switch, Redirect } from 'react-router-dom'
import Login from './pages/Login';
import Layout from './pages/Layout';
import AuthRoute from '@/components/AuthRoute.jsx'
import history from '@/utils/history'
function App() {
  return (
    <Router history={history}>
      <div className="app">
        <Switch>
          <Route path='/login' component={Login}></Route>
          <AuthRoute path='/home' component={Layout}></AuthRoute>
          <Redirect path='/' to='/home'></Redirect>
        </Switch>
      </div>
    </Router>
  );
}

export default App;
